< previous page page_617 next page >

Page 617
Although this code does not do a lot, it does show you how to use the Button object thats passed to this ButtonClick event to determine which button was pressed. In this example, you use the Key property to determine which button was pressed.
8160-0617a.gif
Figure 30.3
An example of a toolbar.
Customizing the Toolbar at Runtime
Double-clicking on the toolbar at runtime invokes the Customize Toolbar dialog box, shown in Figure 30.4. This dialog box allows the user to change the order of the buttons on the toolbar, delete buttons, or reset the toolbar to the default state.
8160-0617b.gif
Figure 30.4
The Customize Toolbar dialog box.
The Customize Toolbar dialog box allows you to select from any of the available buttons on the left side of the form and add them to the toolbar buttons on the right side of the form. You can move selected buttons up or down, and you can even remove buttons from the toolbar. When you close this dialog box, a Change event fires on the toolbar, allowing you to save the changes you make to the Registry. To disable the Customize Toolbar dialog box, set the AllowCustomize property of the toolbar control to False.

 
< previous page page_617 next page >

If you like this book, buy it!